<ul id="ListComment" class="ListComment  emotion">
<?php if(is_array($this->comments) && count($this->comments) > 0) {
	    $count = count($this->comments);
	     for ($i = 0; $i < $count - 1; $i++) :
	         $comment = $this->comments[$i];
	     ?>
		   <li>
				<div class="Comment">
					<h3><?php echo $comment['username'] ?></h3>
					<p><?php echo $comment['comment']?></p>
					<p class="Date"><?php echo date('d-m-Y H:i:s', $comment['dateline']);?></p>
				</div>
				<?php if($comment['reply']) {?>
				<div class="Comment">
					<h3 style="color:red;"><?php echo "Fmit.vn" ?> trả lời : </h3>
					<p><?php echo $comment['reply']?></p>
					<p class="Date"><?php echo date('d-m-Y H:i:s', $comment['last_update']);?></p>
				</div>
				<?php }?>
			</li>
	<?php endfor; ?>
    <?php $lastComment = $this->comments[$count - 1];?>
		<li class="Last">
			<div class="Comment">
			<h3><?php echo $lastComment['username'] ?></h3>
			<p style="word-break:break-word;"><?php echo $lastComment['comment']?></p>
			<p class="Date"><?php echo date('d-m-Y H:i:s', $lastComment['dateline']);?></p>
			</div>
			<?php if($lastComment['reply']) {?>
				<div class="Comment">
					<h3 style="color:red;"><?php echo "Fmit.vn" ?> trả lời : </h3>
					<p><?php echo $lastComment['reply']?></p>
					<p class="Date"><?php echo date('d-m-Y H:i:s', $lastComment['last_update']);?></p>
				</div>
			<?php }?>
		</li>
	</ul>
	<?php } else{?>
	    <?php if(Utils_Global::getCurrentLanguage() == 'en') {?>
    	    <div style="margin-top: 19px;text-align: center;font-weight: bold;" id="nocoursemessage">No comment!</div>
	    <?php } else {?>
    	    <div style="margin-top: 19px;text-align: center;font-weight: bold;" id="nocoursemessage">Chưa có bình luận nào!</div>
	    <?php }?>
	<?php }?>
    <?php echo $this->paginationcontrol2($this->page, $this->totalItem, $this->numRowPerPage,'paginationajaxforcomment.phtml');?>